package com.matt.docpro.model;

import cn.hutool.core.date.DateUtil;
import lombok.Data;

import java.util.Date;

/**
 * Patient
 * Created by on 2024/02/20.
 */
@Data
public class User {
    String id;
    String icon;
    String account;
    String password;
    String mail;
    boolean isBaned;
    String role;
    String name;

    public String getFormatIsBaned() {
        return isBaned ? "禁用" : "正常";
    }

    public String getFormatRole() {
        return switch (role) {
            case "1" -> "医生";
            case "2" -> "患者";
            case "3" -> "挂号处";
            default -> "管理员";
        };
    }
}
